package edu.usc.csci578.project.util.parse;

import java.io.FileNotFoundException;

import edu.usc.csci578.project.generated.graph.SmellArchGraph;

/**
 * Helper class to parse the smellArchGraph XML file.
 */
public class ArchGraphParser extends XMLJaxbParser
{
	/**
	 * Constructor which takes the path to a smellArchGraph XML file
	 * 
	 * @param xmlFilePath
	 *            path to the smellArchGraph XML file
	 */
	public ArchGraphParser(final String xmlFilePath)
	{
		super(xmlFilePath, "edu.usc.csci578.project.generated.graph");
	}

	/**
	 * Gets the Jaxb object representing the root of the smellArchGraph XML file
	 * 
	 * @return the Jaxb object representing the root of the smellArchGraph XML
	 *         file
	 * @throws FileNotFoundException
	 *             if the XML file was not found
	 */
	public SmellArchGraph getRootObject() throws FileNotFoundException
	{
		return (SmellArchGraph) super.unmarshalXML(SmellArchGraph.class)
				.getValue();
	}
}
